package com.accompany.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 聊天消息表
 * </p>
 *
 * @author DC
 * @since 2024-12-26
 */
@Data
@Schema(name = "ChatMessages对象", description = "聊天消息表")
public class ChatMessage implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(name = "sessionId", description = "会话ID")
    private Long sessionId;

    @Schema(name = "senderId", description = "发送者ID")
    private Long senderId;

    @Schema(name = "receiverId", description = "接收者ID")
    private Long receiverId;

    @Schema(name = "content", description = "消息内容")
    private String content;

    @Schema(name = "type", description = "消息类型 1:文本 2:图片 3:语音")
    private Byte type;

    @Schema(name = "status", description = "状态 0:删除 1:正常")
    private Byte status;

    @Schema(name = "isRead", description = "是否已读 0:未读 1:已读")
    private Byte isRead;

    private LocalDateTime createdAt;
}
